<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>打印星星</title>
    <script>
        // 打印五行星星
        var three = '';
        for (var i = 1; i <= 5; i++) {
            for (var j = 1; j <= 5; j++) {
                three += ' @'
            }
            three += '\n'
        }
        console.log(three)

        // 打印倒三角
        var one = '';
        for (var i = 1; i <= 10; i++) {
            for (var j = i; j <= 10; j++) {
                one += ' @'
            }
            one += '\n'
        }
        console.log(one)

        // 打印
        var two = '';
        for (var i = 1; i <= 9; i++) {
            for (var j = 1; j <= i; j++) {
                two += j + 'x' + i + '=' + i * j + '\t';
            }
            two += '\n'
        }
        console.log(two);
    </script>
</head>

<body>

</body>

</html>